#include "CubeFeature.h"

CubeFeature::CubeFeature()
{
    featureType = 1;
    length = -1;
    width = -1;
    high = -1;
}

CubeFeature::~CubeFeature()
{
}

double CubeFeature::getLength()
{
    return length;
}

double CubeFeature::getWidth()
{
    return width;
}

double CubeFeature::getHigh()
{
    return high;
}

void CubeFeature::setLength(double length)
{
    this->length = length;
}

void CubeFeature::setWidth(double width)
{
    this->width = width;
}

void CubeFeature::setHigh(double high)
{
    this->high = high;
}

//void CubeFeature::init(Handle(QIVtkSelectionPipeline) pipeline)
//{
//	//保存Shape属性
//    setShapeId(pipeline->GetShapeID());
//    setLocation(gp_Pnt(pipeline->getShape().Location()));
//
//}

ostream& operator<<(ostream& out, CubeFeature feature)
{
    //覆写<<操作符，将feature信息保存成string，顺序为：featuretype shapeid location.x location.y location.z length width high
    out << "(" << feature.getFeatureType() << "," << feature.getShapeId() << "," << feature.getLocation().X() << "," << feature.getLocation().Y() << "," << feature.getLocation().Z()
        << feature.getLength() << "," << feature.getWidth() << "," << feature.getHigh() <<  ")" << endl;
    return out;
    // TODO: 在此处插入 return 语句
}
